package com.liuhe.date;

import javax.xml.transform.Result;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo3 {
    public static void main(String[] args) throws ParseException {
        String str = "2000-06-08";
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
        //解析成date对象
        Date date = sdf1.parse(str);
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日");
        //再格式化
        String result = sdf2.format(date);
        System.out.println(result);


    }
}
